-- GENERATED SPELL FOR [Ethereal Scavenger] --


function spell0_18309(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(33871,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18309', 8344, 1)
end

function spell1_18309(pUnit, Event) --@Singe,n/a--
pUnit:FullCastSpellOnTarget(33865,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18309', 15000, 1)
end

function spell2_18309(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(34920,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18309', 675, 1)
end

function Sorts_18309(pUnit, Event)
local choix_sorts_18309 = math.random(0, 2)
if choix_sorts_18309 == 0 then
pUnit:RegisterEvent('spell0_18309', 1, 1)
end
if choix_sorts_18309 == 1 then
pUnit:RegisterEvent('spell1_18309', 1, 1)
end
if choix_sorts_18309 == 2 then
pUnit:RegisterEvent('spell2_18309', 1, 1)
end
end

function mob18309_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18309', math.random(1500, 3000), 1)
end

function mob18309_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18309_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18309_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18309, 1, 'mob18309_Action')
RegisterUnitEvent(18309, 2, 'mob18309_Leave')
RegisterUnitEvent(18309, 3, 'mob18309_Kill')
RegisterUnitEvent(18309, 4, 'mob18309_Die')
